package com.cw.DesignModel23.Ceational.PrototypePattern.clone1;

import java.io.Serializable;
import java.util.Date;

public class Wife implements Serializable,Cloneable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -7097042531564638999L;
	private String name;
    private Date birthday;
    /**
     * 浅克隆一个对象
     */
    public Object clone() {
    	Wife wife = null;
        try{
        	wife = (Wife)super.clone();
        }catch(CloneNotSupportedException e){
            e.printStackTrace();
        }finally{
            return wife;
        }
    }
    public Wife(){
        name = "芙蓉姐姐";
        birthday = new Date();
    }
    public Date getBirthday(){
        return birthday;
    }
    
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
}
